<!DOCTYPE html>
<html lang="zh-CN">
	<head>
		<meta charset="UTF-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<title>Document</title>
	</head>

	<body>
		<div id="app">
			<!-- v-model指令是v-bind:和v-on@指令的结合 -->
			<input
				type="text"
				:value="message"
				@input="valueChange"
			/>{{message}}
		</div>

		<script src="../lib/vue.js"></script>
		<script>
			let vm = new Vue({
				el: "#app",
				data: { message: "hello" },
				methods: {
					valueChange(event) {
						this.message = event.target.value;
					}
				}
			});
		</script>
	</body>
</html>
